home *** CD-ROM | disk | FTP | other *** search
- <%@ Language=VBScript CODEPAGE=65001 %>
- <!--#include file="include/wmsLocStrings.inc"-->
- <!--#include file="include/wmsServerHash.inc"-->
- <!--#include file="include/wmsPlugins.inc"-->
- <!--#include file="include/wmsHeader.inc"-->
- <!--#include file="include/wmsPageBanner.inc"-->
- <!--#include file="include/wmsError.inc"-->
- <%
- '+-------------------------------------------------------------------------
- '
- ' Microsoft Windows Media
- ' Copyright (C) Microsoft Corporation. All rights reserved.
- '
- ' File: ArchiveSinkAdmin.asp
- '
- ' Contents:
- '
- '--------------------------------------------------------------------------
-
- ConnectToPlugin
- ConnectToPluginAdmin
-
- BeginErrorHandling
-
- Dim bError
- Dim strPath
- Dim bAutoStart
- Dim dwTabIndex
-
- dwTabIndex = 0
-
- bError = FALSE
-
- Dim strOp
- strOp = trim( posting( "submit" ) )
- if( 0 < Len( strOp ) ) then
-
- on error resume next
-
- if ( 0 < Len( CStr( posting("autoStart") ) ) ) then
- if( FALSE = CBool( g_objPluginAdmin.AutoStart ) ) then
- g_objPluginAdmin.AutoStart = TRUE
- end if
- else
- if( CBool( g_objPluginAdmin.AutoStart ) ) then
- g_objPluginAdmin.AutoStart = FALSE
- end if
- end if
-
- if ErrorDetected( "autoStart" ) then
- bError = TRUE
- end if
-
- Dim strOldArchPath
- Dim strNewArchPath
-
- strOldArchPath = CStr( g_objPluginAdmin.Path )
- strNewArchPath = GetSafePath
-
- if( FALSE = bError ) then
- if ( 0 < Len( strNewArchPath ) ) and ( 0 <> StrComp( strNewArchPath, strOldArchPath, vbTextCompare ) ) then
- if( MAX_PATH >= Len( strNewArchPath ) ) then
- g_objPluginAdmin.Path = strNewArchPath
- end if
- if ErrorDetected( "Path" ) then
- bError = TRUE
- end if
- end if
- else
- Session( "PageReloadedToDisplayError" ) = 1
- err.Description = CStr( Server.HTMLEncode( L_INVALIDPATHNAME_TEXT ) )
- end if
-
- if( FALSE = bError ) then
- Response.Redirect "../pubpoints/pubpoint_props.asp?server=" & g_strQueryStringServer & "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&pluginIndex=" & qs("pluginIndex")
- end if
-
- end if
-
- if( "" <> CStr( posting("autoStart") ) ) then
- bAutoStart = TRUE
- else
- bAutoStart = g_objPluginAdmin.AutoStart
- end if
-
- if( "" <> posting("archivePath") ) then
- strPath = CStr( posting("archivePath") )
- else
- strPath = g_objPluginAdmin.Path
- end if
-
- '//////////////////////////////////////////////////////////////////////////
- Function GetSafePath()
- Dim strPath
- strPath = trim( posting("archivePath") )
- GetSafePath = RemoveSpecifiedChars( strPath, ";|\f|\n|\r|`" )
- End Function
-
- WriteHTMLHeader( g_strDecodedServerName )
- %>
- <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>">
- <% WritePluginJSUtils %>
- <script language="javascript">
- <!--
- /*@cc_on @*/
-
- //////////////////////////////////////////////////////////////////////////
- function ValidatePath()
- {
- <% jsTRY %>
- if( ! document.forms.pluginForm.archivePath )
- {
- return;
- }
-
- var szPath;
- szPath = new String( document.forms.pluginForm.archivePath.value );
-
- // perform left trim
- szPath = szPath.replace( /^\s+/, "" );
-
- // perform right trim
- szPath = szPath.replace( /\s+$/, "" );
-
- window.status="check";
- var szPathFiltered = szPath.replace( /\`|\'|!|@|#|\^|\&|\||{|}|;|\?|\"/g, "" );
- if( szPathFiltered != szPath )
- {
- document.forms.pluginForm.ok.disabled = true;
- document.forms.pluginForm.archivePath.style.color="#FF0000";
- return;
- }
-
- if( 0 >= szPath.length )
- {
- document.forms.pluginForm.ok.disabled = true;
- }
- else
- {
- document.forms.pluginForm.ok.disabled = false;
- document.forms.pluginForm.archivePath.style.color="#000000";
- }
- document.forms.pluginForm.archivePath.focus();
- <% jsCATCH %>
- }
-
- //////////////////////////////////////////////////////////////////////////
- function ToggleCheckbox()
- {
- <% jsTRY %>
- if( document.forms.pluginForm.autoStart )
- {
- document.forms.pluginForm.autoStart.checked = ! document.forms.pluginForm.autoStart.checked;
- }
-
- if( document.forms.pluginForm.ok )
- {
- document.forms.pluginForm.ok.disabled = false;
- }
- <% jsCATCH %>
- }
- -->
- </script>
- </head>
- <body onLoad="JavaScript:ValidatePath();" class="pluginBody" oncontextmenu="JavaScript:event.cancelBubble=true;return false;">
- <% DrawPluginBanner %>
- <table width="90%">
- <tr>
- <td valign=top>
-
- <% WriteStdPluginForm %>
-
- <table class="propgroupbox" border=0 cellspacing=2 cellpadding=2 width=100%>
- <tr>
- <td colspan=3>
- <div align="left" class="helptext"><%= Server.HTMLEncode( L_ARCHIVEPATHHELP_TEXT ) %></div><br>
- </td>
- </tr>
- <tr>
- <td>
- <input type="checkbox"
- name="autoStart" <% if bAutoStart then %>checked<% end if %>
- value="autoStart"
- tabindex=1
- ><label for="autoStart" class="handcursor" onClick="JavaScript:ToggleCheckbox();"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_AUTOSTARTARCH_TEXT ), "autoStart" %></span></label>
- <p>
-
- <% RenderWithErrorCheck Server.HTMLEncode( L_FILENAMECOLON_TEXT ), "Path" %></div>
- <input
- type="text"
- name="archivePath"
- size="75"
- maxlength=<%= Server.HTMLEncode( MAX_PATH ) %>"
- tabindex=2
- onChange="JavaScript:ValidatePath();"
- onPaste="JavaScript:ValidatePath();"
- onKeyDown="JavaScript:ValidatePath();"
- onKeyUp="JavaScript:ValidatePath();"
- value="<%= Server.HTMLEncode( strPath ) %>"
- >
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <br>
- <table class="defaultcursor" width="100%" cellspacing="2" cellpadding="2" border="1" cols="3" bgcolor="#F5F5F5">
- <tr>
- <td align="left">
- <table class="defaultcursor" width="100%" cellspacing="2" cellpadding="2" border="0" cols="3">
- <tr>
- <td align="left" width="32">
- <img src="img/wmstip_32.gif" height="32" width="32">
- </td>
- <td align="left">
- <span class="helptext"><%= Server.HTMLEncode( L_LOCALSTORAGEWARN_TEXT ) %></span>
- </td>
- <td align="right">
-
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td valign=bottom>
- <br>
- <input type="submit" disabled align="baseline" name="ok" value="<%= Server.HTMLEncode( L_OKAYBUTTON_TEXT ) %>" tabIndex=3>
- <input type="button" align="baseline" name="cancel" onclick="Cancel()" value="<%= Server.HTMLEncode( L_CANCELBUTTONSPACED_TEXT ) %>" tabIndex=4 >
- <input type="button" align="baseline" name="help" onclick="JavaScript:DoPluginHelp( '<%= H_ARCHIVERHELPTOPIC %>' )" value="<%= Server.HTMLEncode( L_HELPBUTTONSPACED_TEXT ) %>" id="help" tabindex=5>
- </td>
- </tr>
- </table>
- </font>
- <% dwTabIndex = 5 %>
- </form>
- <script language="JavaScript">
- document.pluginForm.archivePath.focus();
- </script>
- <%
- AlertUserWithPopupErrorDialog
- OnErrorGoBack
- DrawStdFooter
- %>
- </body>
- </html>
- <%
- LatchCurrentPage "plugins/ArchiveSinkAdmin.asp", qs
- EndErrorHandling "ArchiveSinkAdmin.asp"
-
- on error resume next
- PluginsASPCleanup
- %>
-